import request from '@/axios'
function formatRequestUri(name) {
  return 'flow/node/msg/' + name
}

export function Set(id, data) {
  return request.post({
    url: formatRequestUri('Set'),
    data: {
      Id: id,
      Value: data
    }
  })
}

export function Add(data) {
  return request.post({
    url: formatRequestUri('Add'),
    data
  })
}
export function Gets(nodeId) {
  return request.get({
    url: formatRequestUri('Gets'),
    params: {
      nodeId
    }
  })
}

export function Get(id) {
  return request.get({
    url: formatRequestUri('Get'),
    params: {
      id
    }
  })
}

export function Delete(id) {
  return request.get({
    url: formatRequestUri('Delete'),
    params: {
      id
    }
  })
}
